package com.kimari.Singleton;

/**
 * 双重检查
 *
 * @author Reimu
 */
public class DoubleCheck {
    private DoubleCheck() {

    }

    private volatile static DoubleCheck doubleCheck;

    public static DoubleCheck getInstance() {
        if (doubleCheck == null) {
            synchronized (DoubleCheck.class) {
                if (doubleCheck == null) {
                    doubleCheck = new DoubleCheck();
                }
            }
        }
        return doubleCheck;
    }
}
